unit URelUsuarioEmpresa;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UModeloPesquisaRelatorio, DB, DBTables, StdCtrls, Buttons,
  CheckLst, ExtCtrls, URelatorioUsuEmp;

type
  TFRelUsuarioEmpresa = class(TFModeloPesquisaRelatorio)
    QPadraoPesquisaRelatorioEMPCODIGO: TIntegerField;
    QPadraoPesquisaRelatorioEMPRAZAOSOCIAL: TStringField;
    QPadraoPesquisaRelatorioUSUCODIGO: TIntegerField;
    QPadraoPesquisaRelatorioUSUNOME: TStringField;
    procedure BtGerarClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FRelUsuarioEmpresa: TFRelUsuarioEmpresa;

implementation

{$R *.dfm}

procedure TFRelUsuarioEmpresa.BtGerarClick(Sender: TObject);
begin
  inherited;
  FRelatorioUsuEmp := TFRelatorioUsuEmp.Create(Self);
  FRelatorioUsuEmp.QPadraoRelatorio.Close;
  ShowMessage(QPadraoPesquisaRelatorio.SQL.Text);
  FRelatorioUsuEmp.QPadraoRelatorio.SQL := QPadraoPesquisaRelatorio.SQL;
  FRelatorioUsuEmp.QPadraoRelatorio.Open;
  FRelatorioUsuEmp.RelPadrao.Preview();
end;

end.
